// @algorithm @lc id=100277 lang=cpp
// @title qing-wa-tiao-tai-jie-wen-ti-lcof

#include "algm/algm.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
    // @test(2)=2
    // @test(2)=2
    // @test(3)=3
public:
    int numWays(int n) {
        if (n <= 1) {
            return 1;
        }
        vector<int> dp(n + 1, 0);
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; ++i) {
            dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;
        }
        return dp[n];
    }
};